package cn.com.blueInfo.bpm.template.convert;

import cn.com.blueInfo.bpm.common.convert.BaseConvert;
import cn.com.blueInfo.bpm.template.entity.ParallelBranch;
import cn.com.blueInfo.bpm.template.request.ParallelBranchDTO;
import cn.com.blueInfo.bpm.template.response.ParallelBranchVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

/**
 * 并行分支表 对象转换
 * @author suxch
 * @since 2025-08-31 16:23:18
 */
@Mapper(componentModel = "spring")
public interface ParallelBranchConvert
        extends BaseConvert<ParallelBranch, ParallelBranchDTO, ParallelBranchVO> {

    ParallelBranch dtoToEntity(ParallelBranchDTO dto);

    ParallelBranch dtoToEntity(ParallelBranchDTO.UpdatePartialDTO dto);

    @Mapping(source = "status", target = "status", qualifiedByName = "enumToDesc")
    @Mapping(source = "deleted", target = "deleted", qualifiedByName = "enumToDesc")
    ParallelBranchVO entityToVO(ParallelBranch entity);

}